-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extended session #447
Extended session #447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't lose coverage at the same time, so some tests are needed as well.
@@ -166,6 +166,11 @@ func (x *Object) Sign(signer neofscrypto.Signer) error { | |||
return x.sign(signer, x.writeContext) | |||
} | |||
|
|||
// SignedData returnes actual payload which would be signed, if you call [Object.Sign] method. | |||
func (x *Object) SignedData() []byte { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i can offer a pretty indicative scenario for unit test:
- fill token
- call
SignedData
- calculate signature manually
- call
Sign
with static signer - assert
Verify
passes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
session/object.go
Outdated
@@ -166,6 +166,11 @@ func (x *Object) Sign(signer neofscrypto.Signer) error { | |||
return x.sign(signer, x.writeContext) | |||
} | |||
|
|||
// SignedData returnes actual payload which would be signed, if you call [Object.Sign] method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// SignedData returnes actual payload which would be signed, if you call [Object.Sign] method. | |
// SignedData returns actual payload which would be signed, if you call [Object.Sign] method. |
i'd also paraphrase comment to make it closer to Sign
and add cross-reference b/w them: this can make it easier to understand the relationship and differences between the methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, hand trembled
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
2df93d2
to
72c2f7a
Compare
86112bb
to
88f556b
Compare
88f556b
to
e5c5250
Compare
Signed-off-by: Evgenii Baidakov <evgenii@nspcc.io>
e5c5250
to
3241296
Compare
No description provided.